package com.lwlean.test.domain;

import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Pattern;

/**
 * Created by lean on 2017/2/19.
 */
public class Rest {


    @NotEmpty(message = "url地址不能为空！")
    public String url;

    @NotEmpty(message = "请求数据内容不能为空！")
    public String parameter;

    @NotEmpty(message = "请求类型不能为空")
    @Pattern(regexp = "post|get|delete|put|POST|GET|DELETE|PUT",message = "请求类型错误，请填写get、post、put、delete，其中一个！")
    public String method;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getParameter() {
        return parameter;
    }

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }
}
